<?php
/**
 *
 *
 */
class RestrictionGrant extends AppModel
{
    public $name       = "RestrictionGrant";
    public $primaryKey = "resGrantId";


    public function get_restriction_grants(array $conditions, $marker = "all", $fields = array('*'))
    {
		return parent::find($marker, array('conditions' => $conditions, 'fields' => $fields));
    }

    public function __replace($pId, $rId, $active)
    {
    	$sql = "replace `restriction_grants` set `privilegeId`={$pId}, `restrictionId`={$rId}, `active`={$active}";
    	return parent::query($sql);
    }
}
?>